package com.itcast.test;

import android.content.Context;
import android.util.DisplayMetrics;

public class ScreenUtil {

    static int heigth;
    static int width;

    public static int getScreenHeight(Context context){
        DisplayMetrics dm = context.getResources().getDisplayMetrics();
        heigth = dm.heightPixels;
        return heigth;
    }

    public static int getScreenWidth(Context context){
        DisplayMetrics dm = context.getResources().getDisplayMetrics();
        width = dm.widthPixels;
        return width;
    }

}
